<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddTypeColumnInPostTable extends AbstractMigration
{

    public function up()
    {
        $this->table('post')
            ->addColumn('type', 'enum', ['values' => 'normal,catalog_post', 'default' => 'normal', 'comment' => '消息类型'])
            ->save();
    }

    public function down()
    {
        $this->table('post')->removeColumn("type")->save();
    }
}
